Python Type Hints - How to Narrow Types with isinstance, assert, and literal